(*
  Copyright (c) 2009 Barry Schwartz

  Permission is hereby granted, free of charge, to any person
  obtaining a copy of this software and associated documentation
  files (the "Software"), to deal in the Software without
  restriction, including without limitation the rights to use,
  copy, modify, merge, publish, distribute, sublicense, and/or sell
  copies of the Software, and to permit persons to whom the
  Software is furnished to do so, subject to the following
  conditions:

  The above copyright notice and this permission notice shall be
  included in all copies or substantial portions of the Software.

  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
  EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
  OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
  NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
  HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
  WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
  FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
  OTHER DEALINGS IN THE SOFTWARE.
*)

open XNum
open VMTypes
open UTypes
open SymbolTable
  
module Environment : sig type environment = (unknown array) list
                          end
  
val tracing_bytecode : bool ref
  
val add_unknowns : unknown -> unknown -> unknown -> unit
  
val sub_unknowns : unknown -> unknown -> unknown -> unit
  
val mul_unknowns : unknown -> unknown -> unknown -> unit
  
val div_unknowns : unknown -> unknown -> unknown -> unit
  
val prim_add : unknown -> unknown -> partial_value
  
val prim_sub : unknown -> unknown -> partial_value
  
val prim_mul : unknown -> unknown -> partial_value
  
val prim_div : unknown -> unknown -> partial_value
  
val forced_unify : unknown -> unknown -> unit
  
val unify : unknown -> unknown -> bool
  
val execute : bytecode array -> unknown list -> unknown
  
val evaluate_lin_form : unknown -> unknown LinForm.lin_form -> unit
  
val evaluate_num : string -> unknown -> num
  
val evaluate_list : string -> unknown -> unknown list
  
val evaluate_opaque :
  string -> (unknown Opaque.opaque -> 'a) -> string -> unknown -> 'a
  
val print_pattern : pattern_check -> unit
  
val print_partial : int -> partial_value -> unit
  
val print_bytecode : int -> bytecode array -> unit
